<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="ex" uri="/WEB-INF/tld/frm/dictManage.tld"%>
<!DOCTYPE html>
<html lang="en">
<head>
 <%@ include file="/WEB-INF/jsp/common/common.jsp" %>
<link href="${pageContext.request.contextPath}/resource/css/def/frm/common/common.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/resource/css/def/frm/sys/authstyle.css" rel="stylesheet">
<script type="text/javascript">
var hadPermission = {'update':false,'del':false,'select':false,'add':false};
<shiro:hasPermission name="sys:dp:select">
hadPermission.select = true;
</shiro:hasPermission>
<shiro:hasPermission name="sys:dp:delete">
hadPermission.del= true;
</shiro:hasPermission>
<shiro:hasPermission name="sys:dp:update">
	hadPermission.update = true;
</shiro:hasPermission>
<shiro:hasPermission name="sys:dp:save">
hadPermission.add = true;
</shiro:hasPermission>
</script>
<style>
.modal-dialog{ width:600px; margin-right:auto; margin-left:auto;}
</style>
</head>

<body>
	<!-- 主区域  -->
	<div  class="orderchek-border" style="width: auto;">
		<div class="orderchek-title">数据权限分配</div>
		<div class="h-tool">
		    <div class="tool-btn">
		  	  <button class="btn btn-info" id="back-btn" onclick="back()" style="display: none;">返&nbsp;回</button>
		      <button class="btn btn-info" id="copy-btn" onclick="copyDP()"><span class="copycon"></span>复制</button>
		    </div>
		    <div class="clearfix"></div>
		</div>
		    <div class="pt5" style="display: none;margin-left: 55px" id="copy-tool">
		      <button class="btn btn-info" onclick="selectAll()"><span>全选</span>
		      <button class="btn btn-info" onclick="dropAll()"><span>全不选</span>
		      <button class="btn btn-info" onclick="copyTo()"><span class="copycon2"></span>复制到</button>
		    </div>
		    <div class="clearfix"></div>
		
		<div class="ordercheck-table table-responsive">
			<div id="dataPermissionShow">
				<ul id="list1">
				</ul>
			</div>
		</div>
	</div>
	<!-- 主区域结束 -->
	
	<!-- 数据权限范围开始 -->
	<div class="modal fade" id="view" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">数据权限</h4>
            </div>
				<div class="modal-body">
					<form class="form-horizontal" role="form">
						<div class="form-group">
							<label for="dataPermissionType" class="col-sm-2 control-label"
								style="white-space: nowrap;">数据权限：</label>
							<div class="col-sm-10">
								<select class='form-control' id="dataPermissionTypenew"
									name="dataPermissionType" data-placeholder="数据权限类型">
								</select>
							</div>
						</div>
						<div class="form-group">
							<label  class="col-sm-2 control-label">说明：</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" id="introduction"
									name='dataIntroduction' placeholder="范围说明">
							</div>
						</div>
						<iframe id="mdiframe" width="100%" height="80%" frameborder="0" class="mt-10"></iframe>
					</form>
				</div>
				<!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</div>
	<!-- 数据权限结束 -->
	
	<!-- 数据权限复制开始 -->
		<div class="modal fade" id="copyView" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title" id="myModalLabel">数据权限复制</h4>
	            </div>
					<div class="modal-body">
							<iframe id="copyiframe" width="100%" height="80%" frameborder="0" class="mt-10"></iframe>
					</div>
					<!-- /.modal-content -->
	    </div><!-- /.modal -->
	</div>
	</div>
	<!-- 数据权限复制结束 -->
	
	
<script src="${pageContext.request.contextPath}/resource/js/frm/sys/sysDataPermission.js"></script>
<title>数据权限分配</title>
<script type="text/javascript">
var id=${bindId};
var staffId=${staffId}
var orgId=${orgId}
var pType="so";
$(function(){
	getDp(staffId,orgId,id);
});
</script>
</body>
</html>